vcSelectionManager

vcSelectionManager is responsible for handling the types of selections used by the application.

See in: Overview

Module: vcCore

Parent: -

Children -

Referenced by: vcApplication.SelectionManager

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
clearNoneNoneRemoves all objects from selection.
getSelectionvcListNoneReturns all currently selected objects.
See more
Some selectable objects don't have a corresponding class in the Python API and thus aren't included.

Returns:
List[vcObject]: The selected objects. Empty list if none.
getSelectionvcListtype typeReturns currently selected objects of given type.
See more
The type filtering works like the Python isinstance(obj, type) function. It considers class inheritance.

Parameters:
type (Type): A Python class derived from vcObject such as vcComponent.

Returns:
List[vcObject]: The selected objects. Empty list if none.
setSelectionNonevcObject object,
Optional Keyword[append = Boolean]
Either replaces the current selection or appends to it.
See more
Parameters:
object (vcObject): Object to select.
append (bool): When True, the object is added to current selection.

Exceptions:
ValueError: When the object has been deleted.
RuntimeError: When the object can't be selected.
setSelectionNonelist objects,
Optional Keyword[append = Boolean]
Either replaces the current selection or appends to it.
See more
Parameters:
objects (List[vcObject]): Objects to select.
append (bool): When True, the objects are added to current selection.

Exceptions:
ValueError: When any of the objects have been deleted.
RuntimeError: When any of the objects can't be selected.

Events

Learn how to use events here. The events are also inherited from the parent class.

NameParametersDescription
OnSelectionChangedNoneEvent triggered when selection has changed.